<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Javascript image dropdown - mouse events</title>
<link rel="stylesheet" href="css/sample.css" />
<script src="../js/jquery/jquery-1.9.0.min.js"></script>

<!-- <msdropdown> -->
<link rel="stylesheet" type="text/css" href="../css/msdropdown/dd.css" />
<script src="../js/msdropdown/jquery.dd.min.js"></script>
<!-- </msdropdown> -->

<style type="text/css">
.small1 {font-size:10px; line-height:12px; color:#006; font-weight:normal; font-family:Arial, Helvetica, sans-serif; position:relative; top:-10px}
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="5" class="topmenu">
  <tr>
    <td colspan="2" class="top"><h1>Javascript image dropdown <span id="ver"></span> <a title="Download" href="http://www.marghoobsuleman.com/jquery-image-dropdown" class="small">Download</a></h1></td>
  </tr>
  <tr>
    <td width="25%"><select style="width:250px"  name="pages" id="pages">
      <option value="" selected="selected">Choose a sample page</option>
      <option value="index.html">Normal</option>
      <option value="byjson.html">By Json Data</option>
      <option value="multiple-skin.html">Multiple Skin</option>
      <option value="css-sprite.html">CSS Sprite</option>
      <option value="object-oriented-approach.html">Object Oriented Approach</option>
      <option value="object-oriented-approach-more.html">Object Oriented Approach - More</option>
      <option value="use-checkbox.html">Use Checkbox</option>
      <option value="mouse-events.html">Mouse Events</option>
      <option value="help.html">Documentation</option>
    </select></td>
    <td align="left"><a href="help.html">Documentation</a></td>
  </tr>
</table>
<form action="submitdata.php" method="post" enctype="multipart/form-data" name="frmdata">
<table width="100%" border="0" cellspacing="1" cellpadding="5" class="tblWhite">
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td width="59%" valign="top"><table width="600" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="600" align="center"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center" bgcolor="#f2f2f2">            
              <a class="demoinaction" id="converta" href="javascript:convertNow();"  style="cursor:pointer;">Convert all combobox to image dropdown!</a></td>
            </tr>
          <tr>
            <td align="center" bgcolor="#f2f2f2"><div id="mainHolder" style="background-color:#CCCCCC">
              <input type="button" name="designView" id="designView" value="Design View" onclick="$('#designhtml').show();$('#codehtml').hide();" style="width:100px; margin:10px" />
              <input type="button" name="codeView" id="codeView" value="Code View" onclick="$('#designhtml').hide();$('#codes').text($('#designhtml').html());$('#codehtml').show();" style="width:100px; margin:10px" />
              <input type="button" name="convertBtn" id="convertBtn" value="Convert to image dropdown" onclick="convertNow('#designhtml select')" style="margin:10px" />
              <div id="codehtml" class="hidden" style="height:500px; overflow:auto; border:1px solid #c3c3c3; width:500px; background-color:#FFFFFF">
                <pre id="codes" style="overflow:auto">
    </pre>
                </div>
              <div id="designhtml">
                <table width="100%" border="0" align="left" cellpadding="5" cellspacing="0" bgcolor="#999999">
                  <tr>
                    <td height="30" align="left" valign="bottom" bgcolor="#FFFFFF"><h2><strong> Event Examples</strong></h2></td>
                    <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                    </tr>
                  <tr>
                    <td height="30" align="left" valign="bottom" bgcolor="#FFFFFF">onchange drop down</td>
                    <td align="left" bgcolor="#FFFFFF"><select name="websites3" id="websites3" style="width:200px;" onchange="showValue($('#websites3 option:selected').text(), this.value);output('onchange', this);" >
                      <option value="calendar" selected="selected" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif">Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                  </tr>
                  <tr>
                    <td height="30" align="left" bgcolor="#FFFFFF">onclick</td>
                    <td align="left" valign="bottom" bgcolor="#FFFFFF"><select name="websites5" id="websites5" onclick="showValue($('#websites5 option:selected').text(), this.value);output('onclick', this);" style="width:200px;" >
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" selected="selected" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif"  >Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                  </tr>
                  <tr>
                    <td height="30" align="left" bgcolor="#FFFFFF">ondblclick<br />
                      (does not support in original, but it works in converted)</td>
                    <td align="left" valign="bottom" bgcolor="#FFFFFF"><select name="websites6" id="websites6" ondblclick="showValue($('#websites6 option:selected').text(), this.value);output('ondblclick', this)" style="width:200px;">
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" selected="selected" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif"  >Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                    </tr>
                  <tr>
                    <td height="30" align="left" bgcolor="#FFFFFF">onmousemove</td>
                    <td align="left" valign="bottom" bgcolor="#FFFFFF">
                    <select name="websites8" id="websites8" onmousemove="showValue($('#websites8 option:selected').text(), this.value);output('onmousemove', this)" style="width:200px;">
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" selected="selected" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif"  >Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                    </tr>
                  <tr>
                    <td height="30" align="left" bgcolor="#FFFFFF">onmouseover</td>
                    <td align="left" valign="bottom" bgcolor="#FFFFFF">
                    <select name="websites7" id="websites7" onmouseover="showValue($('#websites7 option:selected').text(), this.value);output('onmouseover', this)" style="width:200px;">
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" selected="selected"   title="../images/msdropdown/icons/icon_games.gif">Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                    </tr>
                  <tr>
                    <td height="30" align="left" bgcolor="#FFFFFF">onmouseout</td>
                    <td align="left" valign="bottom" bgcolor="#FFFFFF">
                    <select name="websites9" id="websites9" onmouseout="showValue($('#websites9 option:selected').text(), this.value);output('onmouseout', this)" style="width:200px;">
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif"  >Games</option>
                      <option value="music" selected="selected" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                  </tr>
                  <tr>
                    <td height="30" align="left" bgcolor="#FFFFFF">onmousedown</td>
                    <td align="left" valign="bottom" bgcolor="#FFFFFF">
                    <select name="websites11" id="websites11" onmousedown="showValue($('#websites11 option:selected').text(), this.value);output('onmousedown', this)" style="width:200px;">
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif"  >Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" selected="selected" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                  </tr>
                  <tr>
                    <td height="30" align="left" bgcolor="#FFFFFF">onmouseup</td>
                    <td align="left" valign="bottom" bgcolor="#FFFFFF">
                    <select name="websites12" id="websites12" onmouseup="showValue($('#websites12 option:selected').text(), this.value);output('onmouseup', this)" style="width:200px;">
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif"  >Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" selected="selected" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                    </tr>
                  <tr>
                    <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                    <td align="left" bgcolor="#FFFFFF">javascript Image dropdown :)</td>
                    </tr>
                  <tr>
                    <td height="30" align="left" valign="top" bgcolor="#FFFFFF">onkeydown</td>
                    <td align="left" bgcolor="#FFFFFF"><select name="websitesonkey" id="websitesonkey" onkeydown="showValue($('#websitesonkey option:selected').text(), this.value);output('onkeydown', this)" style="width:200px;">
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif"  >Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" selected="selected" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                    </tr>
                  <tr>
                    <td height="30" align="left" valign="top" bgcolor="#FFFFFF">onkeyup</td>
                    <td align="left" bgcolor="#FFFFFF"><select name="websitesonkeyup" id="websitesonkeyup" onkeyup="showValue($('#websitesonkeyup option:selected').text(), this.value);output('onkeyup', this)" style="width:200px;">
                      <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                      <option value="shopping_cart" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                      <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                      <option value="email" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                      <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                      <option value="games" title="../images/msdropdown/icons/icon_games.gif"  >Games</option>
                      <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                      <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                      <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                      <option value="secured" selected="selected" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                      <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                      </select></td>
                    </tr>
                  <tr>
                    <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                    <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                    </tr>
                  <tr>
                    <td height="30" colspan="2" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                    </tr>
                  <tr>
                    <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                    <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                    </tr>
                  </table>
                </div>
              </div>
              <div id="mainHolder2" style="background-color:#CCCCCC; clear:both;">
                <input type="button" name="designView2" id="designView2" value="Design View" onclick="$('#designhtml2').show();$('#codehtml2').hide();" style="width:100px; margin:10px" />
                <input type="button" name="codeView2" id="codeView2" value="Code View" onclick="$('#designhtml2').hide();$('#codes2').text($('#designhtml2').html());$('#codehtml2').show();" style="width:100px; margin:10px" />
                <input type="button" name="convertBtn" id="convertBtn" value="Convert to image dropdown" onclick="convertNow('#designhtml2 select')"  style="margin:10px" />
                <div id="codehtml2" class="hidden" style="height:500px; overflow:auto; border:1px solid #c3c3c3; width:95%; background-color:#FFFFFF">
                  <pre id="codes2" style="overflow:auto">
      </pre>
                  </div>
                <div id="designhtml2">
                  <table width="100%" border="0" align="left" cellpadding="5" cellspacing="0" bgcolor="#999999">
                    <tr>
                      <td height="30" align="left" valign="bottom" bgcolor="#FFFFFF"><h2><strong>Inline Style</strong></h2></td>
                      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>
                    <tr>
                      <td height="30" align="left" bgcolor="#FFFFFF"><label>Inline Style </label></td>
                      <td align="left" valign="bottom" bgcolor="#FFFFFF"><select name="multi2" id="multi2" onchange="showValue($('#multi2 option:selected').text(), this.value); output('onchage', this)" style="width:300px">
                        <option value="enabled" title="../images/msdropdown/icons/enabled.gif">I am enabled</option>
                        <option value="disabled" title="../images/msdropdown/icons/enabled.gif" disabled="disabled">I am disabled</option>
                        <option value="colored" title="../images/msdropdown/icons/enabled.gif" style="background-color:#99FF00; color:#333333;">I&acute;ve inline style :0</option>
                        <option value="what" title="../images/msdropdown/icons/enabled.gif">I am simple</option>
                        <option value="what" title="../images/msdropdown/icons/enabled.gif">I am also simple</option>
                        </select></td>
                      </tr>
                    <tr>
                      <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>
                    <tr>
                      <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>
                    <tr>
                      <td height="30" align="left" valign="bottom" bgcolor="#FFFFFF"><h2><strong>OPTGROUP</strong></h2></td>
                      <td align="left" bgcolor="#FFFFFF">
                      <select name="ComOS2" id="ComOS2" style="width:250px">
                        <option selected="selected" label="none" value="none">None</option>
                        <optgroup label="PortMaster 3" title="../images/msdropdown/icons/icon_calendar.gif">
                          <option value="pm3_3.7.1">PortMaster 3 with ComOS 3.7.1</option>
                          <option value="pm3_3.7">PortMaster 3 with ComOS 3.7</option>
                          <option value="pm3_3.5">PortMaster 3 with ComOS 3.5</option>
                          </optgroup>
                        <optgroup label="PortMaster 2">
                          <option value="pm2_3.7" title="../images/msdropdown/icons/enabled.gif">PortMaster 2 with ComOS 3.7</option>
                          <option value="pm2_3.5">PortMaster 2 with ComOS 3.5</option>
                          </optgroup>
                        <optgroup label="IRX">
                          <option value="IRX_3.7R" style="background-color:#CCCC00">IRX with ComOS 3.7R</option>
                          <option value="IRX_3.5R">IRX with ComOS 3.5R</option>
                          </optgroup>
                        </select></td>
                      </tr>
                    <tr>
                      <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>
                    <tr>
                      <td height="30" align="left" valign="top" bgcolor="#FFFFFF"><h2>List</h2></td>
                      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>
                    <tr>
                      <td height="30" align="left" valign="bottom" bgcolor="#FFFFFF"><select name="listbox" size="5" multiple="multiple" id="listbox" style="width:200px;" onchange="showValue($('#websites3 option:selected').text(), this.value);output('onchange', this);" >
                        <option value="calendar" title="../images/msdropdown/icons/icon_calendar.gif">Calendar</option>
                        <option value="shopping_cart" selected="selected" title="../images/msdropdown/icons/icon_cart.gif">Shopping Cart</option>
                        <option value="cd" title="../images/msdropdown/icons/icon_cd.gif">CD</option>
                        <option value="email" selected="selected" title="../images/msdropdown/icons/icon_email.gif">Email</option>
                        <option value="faq" title="../images/msdropdown/icons/icon_faq.gif">FAQ</option>
                        <option value="games" selected="selected" title="../images/msdropdown/icons/icon_games.gif">Games</option>
                        <option value="music" title="../images/msdropdown/icons/icon_music.gif">Music</option>
                        <option value="phone" title="../images/msdropdown/icons/icon_phone.gif">Phone</option>
                        <option value="graph" title="../images/msdropdown/icons/icon_sales.gif">Graph</option>
                        <option value="secured" title="../images/msdropdown/icons/icon_secure.gif">Secured</option>
                        <option value="video" title="../images/msdropdown/icons/icon_video.gif">Video</option>
                        </select>
                        &nbsp;</td>
                      <td align="left" bgcolor="#FFFFFF"><button type="button" id="get" value="Get Indexes" onclick="return getSelctedIndexes('listbox')">Get Indexes</button></td>
                      </tr>
                    <tr>
                      <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>
                    </table>
                  </div>
                </div>
              <div id="mainHolder3" style="background-color:#CCCCCC; clear:both;">
                <input type="button" name="designView3" id="designView3" value="Design View" onclick="$('#designhtml3').show();$('#codehtml3').hide();" style="width:100px; margin:10px" />
                <input type="button" name="codeView3" id="codeView3" value="Code View" onclick="$('#designhtml3').hide();$('#codes3').text($('#designhtml3').html());$('#codehtml3').show();" style="width:100px; margin:10px" />
                <input type="button" name="convertBtn" id="convertBtn" value="Convert to image dropdown" onclick="convertNow('#designhtml3 select')"  style="margin:10px" />
                <div id="codehtml3" class="hidden" style="height:500px; overflow:auto; border:1px solid #c3c3c3; width:95%; background-color:#FFFFFF">
                  <pre id="codes3" style="overflow:auto">
      </pre>
                  </div>
                <div id="designhtml3">
                  <table width="100%" border="0" align="left" cellpadding="5" cellspacing="0" bgcolor="#999999">
                    <tr>
                      <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>
                    <tr>
                      <td height="30" align="left" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
                      <td align="left" bgcolor="#FFFFFF">&nbsp;</td>
                      </tr>
                    </table>
                  </div>
                </div></td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    <td width="2%" valign="top">&nbsp;</td>
    <td width="39%" valign="top"><div id="debugwindow" style="position:absolute;border:2px solid #333; margin:10px; background:#FFF; width:400px; float:right " >
      <div style="height:20px; padding:5px 10px;background-color:#000; color:#FFF;"><a href="javascript:clearDebugWindow()" style="float:right;color:#fff">Clear Window</a> Debug Window</div>
      <div style="clear:both;padding:10px;">
        <h1 id="selectedvalue">Select any dropdown </h1>
        <p id="info"></p>
      </div>
      <div id="output" style="padding:10px;"></div>
    </div></td>
  </tr>
  <tr>
    <td colspan="3" valign="bottom">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" valign="bottom">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" valign="top">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3" valign="top">&nbsp;</td>
  </tr>
</table>
</form>
<p>&nbsp;</p>

<script>

$(document).ready(function(e) {
	//no use
	try {
		var pages = $("#pages").msDropdown({on:{change:function(data, ui) {
												var val = data.value;
												if(val!="")
													window.location = val;
											}}}).data("dd");

		var pagename = document.location.pathname.toString();
		pagename = pagename.split("/");
		pages.setIndexByValue(pagename[pagename.length-1]);
		$("#ver").html(msBeautify.version.msDropdown);
	} catch(e) {
		//console.log(e);	
	}
	
	$("#ver").html(msBeautify.version.msDropdown);
	
	//window scroll
	 $(window).bind("scroll",scrollMe);		
	});
</script>

<script>
//This file is just for demo purpose. 
//no use in your project :)
// please dont use this file in your project
function showValue(arg, arg2) {
	//alert("calling show me: arg1 " + arg + " arg2 " +  arg2);
	var s = (arg2==undefined) ? '' : "<br /><font color='darkgreen'>value:</font> "+ arg2;
	$("#selectedvalue").html("<font color='darkgreen'>label:</font> " + arg +  s);
}
function convertNow(byIds) {
	//MSDropDown.showIconWithTitle(false);
	try {
		if(byIds==undefined) {
			$("body select").msDropDown();
		} else {
			$(byIds).msDropDown();
		}
		$("#converta").hide("fast");
	} catch(e) {
		//console.debug(e);
		alert(e);
	}
	$('#info').html('<h2>I would appreciate your <a style="color:chocolate" href="http://www.marghoobsuleman.com/jquery-image-dropdown#comment-controls">feedback.</a></h2>');
}
var counter = 1;
function output(msg, id) {
	if(counter>=100) counter = 1;
	var  old = $("#output").html();
	var sID = (typeof id=="string") ? id : id.id;
	$("#output").html((counter++)+": id= "+ sID +" : " + msg+"<br />"+old);
}
function clearDebugWindow() {
	counter = 1;
	$("#output").html("");
}

function disabledcombo(targetCombo, disabled) {
	$("#"+targetCombo).data("dd").set("disabled", disabled)
}   

function getSelctedIndexes(targetCombo) {
		var selectedIndex = $("#"+targetCombo).data("dd").selectedOptions;
		for(var i=0;i<selectedIndex.length;i++) {
			output(selectedIndex[i].index, targetCombo);
		}
	return false;
}

function scrollMe() {
	var position = $("#debugwindow").position();
	var windowPos = $(window).scrollTop();
	if(windowPos<100) {
		windowPos = 100;
	}
	//console.debug("windowPos "+windowPos);
	$("#debugwindow").animate({top:(windowPos)}, {queue:false, duration:1000});
}
</script>

</body>
</html>
